﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace fetco.entities
{
    public class WebUser
    {
        #region Parameter
        private long? _user_id;
        private string _login_name;
        private string _first_name;
        private string _last_name;
        private string _password;
        private string _avatar;
        private long? _birthday;
        private int? _gender;
        private string _address;
        private long? _create_date;
        private int? _published;
        private int? _status;
        #endregion

        #region Contructor
        public WebUser() { }
        public WebUser(
            string login_name,
            string first_name,
            string last_name,
            string password,
            string avatar,
            long birthday,
            int gender,
            string address
            )
        {
            this._user_id = 0;
            this._login_name = login_name;
            this._first_name = first_name;
            this._last_name = last_name;
            this._password = password;
            this._avatar = avatar;
            this._birthday = birthday;
            this._gender = gender;
            this._address = address;
            this._published = 1;
            this._status = 1;
        }
        #endregion

        #region Properties
        public static string TableName
        {
            get { return "webuser";}
        }

        public long? UserId
        {
            get { return this._user_id; }
            set { this._user_id = value; }
        }

        public string LoginName
        {
            get { return this._login_name; }
            set { this._login_name = value; }
        }

        public string FirstName
        {
            get { return this._first_name; }
            set { this._first_name = value; }
        }

        public string LastName
        {
            get { return this._last_name; }
            set { this._last_name = value; }
        }

        public string Password
        {
            get { return this._password; }
            set { this._password = value; }
        }

        public string Avatar
        {
            get { return this._avatar; }
            set { this._avatar = value; }
        }

        public long? Birthday
        {
            get { return this._birthday; }
            set { this._birthday = value; }
        }

        public int? Gender
        {
            get { return this._gender; }
            set { this._gender = value; }
        }

        public string Address
        {
            get { return this._address; }
            set { this._address = value; }
        }

        public long? CreateDate
        {
            get { return this._create_date; }
            set { this._create_date = value; }
        }

        public int? Published
        {
            get { return this._published; }
            set { this._published = value; }
        }

        public int? Status
        {
            get { return this._status; }
            set { this._status = value; }
        }

        #endregion
    }

    public class ListWebUser : List<WebUser> { }

    public enum WebUserField
    {
        UserId,
        LoginName,
        FirstName,
        LastName,
        Password,
        Avatar,
        Birthday,
        Gender,
        Address,
        CreateDate,
        Published,
        Status
    }
}
